<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>头部-有点</title>
<link rel="stylesheet" type="text/css" href="css/css.css" />
<script type="text/javascript">
function display(obj) {
    var file = obj.files[0];

    console.log(obj);console.log(file);
    console.log("file.size = " + file.size);  //file.size 单位为byte

    var reader = new FileReader();

    //注册相关的回调
    //成功后的回调，最重要的一个
    reader.onload = function (e) {
        //展示
        var img = document.getElementById("displayImg");
        img.src = e.target.result;
    }

    //读取
    reader.readAsDataURL(file)
}
</script>
<script type="text/javascript" src="js/jquery.min.js"></script>
</head>
<body>
	<div id="pageAll">
		<div class="pageTop">
			<div class="page">
				<img src="img/coin02.png" /><span><a href="#">首页</a>&nbsp;-&nbsp;<a
					href="#">公共管理</a>&nbsp;-</span>&nbsp;意见管理
			</div>
		</div>
		<div class="page ">
		<form method="post" action="addADERT" enctype="multipart/form-data">
			<!-- 上传广告页面样式 -->
			<div class="banneradd bor">
				<div class="baTop">
					<span>上传广告</span>
				</div>
				<div class="baBody">
					<div class="bbD">
						链接名称：<input type="text" class="input1" name="name" />
					</div>
					<div class="bbD">
						链接地址：<input type="text" class="input1" name="address" />
					</div>
					<div class="">
						上传图片：<input type="file" onchange="display(this)" accept="image/*" name="file"/><br />
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<img width="160" height="180" id="displayImg"/><br />
					</div>
					<div class="bbD">
						是否显示：<label><input type="radio" checked="checked" />是</label> <label><input
							type="radio" />否</label>
					</div>
					<div class="bbD">
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;描述：<input class="input1"
							type="text" name="describes" />
					</div>
					<div class="bbD">
						<p class="bbDP">
							<input type="submit" class="btn_ok btn_yes" value="提交" />
							<a class="btn_ok btn_no" href="banner">取消</a>
						</p>
					</div>
				</div>
			</div>
         </form>
			<!-- 上传广告页面样式end -->
		</div>
	</div>
</body>
</html>